package Adapter;

import Pro.MyFruit;
//成员关系
//将目标类和适配者类解耦
public class Adapter02 implements InewJuicer{
    private OldJuicer oldJuicer;
    public String newPort(MyFruit fruit1, MyFruit fruit2){
        oldJuicer = new OldJuicer();
        String str = "混合果汁:" + oldJuicer.onePort(fruit1);
        str += oldJuicer.onePort(fruit2);
        return str;
    }
}
